<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>VIO</title>
<title>CMSIS-Driver: VIO</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<script type="text/javascript" src="cmsis_footer.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-Driver
   &#160;<span id="projectnumber">Version 2.8.0</span>
   </div>
   <div id="projectbrief">Peripheral Interface for Middleware and Application Code</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
      <li><a href="modules.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__vio__interface__gr.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Content</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">VIO</div>  </div>
</div><!--header-->
<div class="contents">

<p>API for Virtual I/O (VIO) (cmsis_vio.h)  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Content</h2></td></tr>
<tr class="memitem:group__vioDefines__gr"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vioDefines__gr.html">Defines and Structs</a></td></tr>
<tr class="memdesc:group__vioDefines__gr"><td class="mdescLeft">&#160;</td><td class="mdescRight">Documents the defines and structs of the VIO API. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga84e05ae351226f41d461dbe982b2372f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a> (void)</td></tr>
<tr class="memdesc:ga84e05ae351226f41d461dbe982b2372f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize test input, output.  <a href="#ga84e05ae351226f41d461dbe982b2372f">More...</a><br/></td></tr>
<tr class="separator:ga84e05ae351226f41d461dbe982b2372f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1dcabb62642917a4911d26175132a339"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga1dcabb62642917a4911d26175132a339">vioPrint</a> (uint32_t level, const char *format,...)</td></tr>
<tr class="memdesc:ga1dcabb62642917a4911d26175132a339"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print formated string to test terminal.  <a href="#ga1dcabb62642917a4911d26175132a339">More...</a><br/></td></tr>
<tr class="separator:ga1dcabb62642917a4911d26175132a339"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1ded6ad7451e43d94f00e9efaddfe621"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga1ded6ad7451e43d94f00e9efaddfe621">vioSetSignal</a> (uint32_t mask, uint32_t signal)</td></tr>
<tr class="memdesc:ga1ded6ad7451e43d94f00e9efaddfe621"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set signal output.  <a href="#ga1ded6ad7451e43d94f00e9efaddfe621">More...</a><br/></td></tr>
<tr class="separator:ga1ded6ad7451e43d94f00e9efaddfe621"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga852f94060d9bef92b193e9992a1c2016"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga852f94060d9bef92b193e9992a1c2016">vioGetSignal</a> (uint32_t mask)</td></tr>
<tr class="memdesc:ga852f94060d9bef92b193e9992a1c2016"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get signal input.  <a href="#ga852f94060d9bef92b193e9992a1c2016">More...</a><br/></td></tr>
<tr class="separator:ga852f94060d9bef92b193e9992a1c2016"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d2572868a34ccfdb10d32adce8f6102"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga5d2572868a34ccfdb10d32adce8f6102">vioSetValue</a> (uint32_t id, int32_t value)</td></tr>
<tr class="memdesc:ga5d2572868a34ccfdb10d32adce8f6102"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set value output.  <a href="#ga5d2572868a34ccfdb10d32adce8f6102">More...</a><br/></td></tr>
<tr class="separator:ga5d2572868a34ccfdb10d32adce8f6102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga637e596f4309323b1e4e1da6200d4717"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga637e596f4309323b1e4e1da6200d4717">vioGetValue</a> (uint32_t id)</td></tr>
<tr class="memdesc:ga637e596f4309323b1e4e1da6200d4717"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get value input.  <a href="#ga637e596f4309323b1e4e1da6200d4717">More...</a><br/></td></tr>
<tr class="separator:ga637e596f4309323b1e4e1da6200d4717"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga440aca5e2a9fb89a56ce727329b23b54"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga440aca5e2a9fb89a56ce727329b23b54">vioSetXYZ</a> (uint32_t id, <a class="el" href="group__vioValues__gr.html#structvioValueXYZ__t">vioValueXYZ_t</a> valueXYZ)</td></tr>
<tr class="memdesc:ga440aca5e2a9fb89a56ce727329b23b54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set XYZ value output.  <a href="#ga440aca5e2a9fb89a56ce727329b23b54">More...</a><br/></td></tr>
<tr class="separator:ga440aca5e2a9fb89a56ce727329b23b54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3e1e45b6a85ae9a3a7f30ef9918c34b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__vioValues__gr.html#structvioValueXYZ__t">vioValueXYZ_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga3e1e45b6a85ae9a3a7f30ef9918c34b1">vioGetXYZ</a> (uint32_t id)</td></tr>
<tr class="memdesc:ga3e1e45b6a85ae9a3a7f30ef9918c34b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get XYZ value input.  <a href="#ga3e1e45b6a85ae9a3a7f30ef9918c34b1">More...</a><br/></td></tr>
<tr class="separator:ga3e1e45b6a85ae9a3a7f30ef9918c34b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafec1413f0d3624bb8922a3973636b587"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#gafec1413f0d3624bb8922a3973636b587">vioSetIPv4</a> (uint32_t id, <a class="el" href="group__vioIPAddr__gr.html#structvioAddrIPv4__t">vioAddrIPv4_t</a> addrIPv4)</td></tr>
<tr class="memdesc:gafec1413f0d3624bb8922a3973636b587"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set IPv4 address output.  <a href="#gafec1413f0d3624bb8922a3973636b587">More...</a><br/></td></tr>
<tr class="separator:gafec1413f0d3624bb8922a3973636b587"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga22b8711d1858eedde919053d269aa073"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__vioIPAddr__gr.html#structvioAddrIPv4__t">vioAddrIPv4_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga22b8711d1858eedde919053d269aa073">vioGetIPv4</a> (uint32_t id)</td></tr>
<tr class="memdesc:ga22b8711d1858eedde919053d269aa073"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get IPv4 address input.  <a href="#ga22b8711d1858eedde919053d269aa073">More...</a><br/></td></tr>
<tr class="separator:ga22b8711d1858eedde919053d269aa073"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3592d2a14aca73d219022712279b8fa5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#ga3592d2a14aca73d219022712279b8fa5">vioSetIPv6</a> (uint32_t id, <a class="el" href="group__vioIPAddr__gr.html#structvioAddrIPv6__t">vioAddrIPv6_t</a> addrIPv6)</td></tr>
<tr class="memdesc:ga3592d2a14aca73d219022712279b8fa5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set IPv6 address output.  <a href="#ga3592d2a14aca73d219022712279b8fa5">More...</a><br/></td></tr>
<tr class="separator:ga3592d2a14aca73d219022712279b8fa5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabde8fededde24fc47b1b80fdee4466f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__vioIPAddr__gr.html#structvioAddrIPv6__t">vioAddrIPv6_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vio__interface__gr.html#gabde8fededde24fc47b1b80fdee4466f0">vioGetIPv6</a> (uint32_t id)</td></tr>
<tr class="memdesc:gabde8fededde24fc47b1b80fdee4466f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get IPv6 address from peripheral.  <a href="#gabde8fededde24fc47b1b80fdee4466f0">More...</a><br/></td></tr>
<tr class="separator:gabde8fededde24fc47b1b80fdee4466f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>API for Virtual I/O (VIO) (cmsis_vio.h) </p>
<p>The VIO software component is a virtual I/O abstraction for peripherals that are typically used in example projects. It enables developers to move from an evaluation kit to custom hardware and helps to scale project examples at large to many development boards:</p>
<div class="image">
<img src="vioRationale.png" alt="vioRationale.png"/>
<div class="caption">
Virtual I/O provides a generic API for examples and testing</div></div>
<p> <b>VIO API</b></p>
<p>The following header file defines the Application Programming Interface (API) for VIO:</p>
<ul>
<li><b>cmsis_vio.h</b> : API for VIO</li>
</ul>
<p><b>VIO User Code Templates</b></p>
<p>The VIO software component contains two user code templates with different purposes:</p>
<ul>
<li>VIO:Custom: This file is an empty stub with all functions that are defined in the header file that can be used to implement the VIO layer for the hardware that is used in the application.</li>
<li>VIO:Virtual: This file uses a fixed memory location to emulate the VIO functionality and can be used off-the-shelf.</li>
</ul>
<p><b>VIO Memory Location Structure</b></p>
<p>For testing purposes, it is required to have fixed memory locations that are used to read/store values. In the VIO:Virtual template file (<b>vio.c</b>), an exemplary implementation is shown:</p>
<div class="fragment"><div class="line"><span class="comment">// Input, output variables</span></div>
<div class="line">__USED uint32_t      vioSignalIn;                                       <span class="comment">// Memory for incoming signal</span></div>
<div class="line">__USED uint32_t      vioSignalOut;                                      <span class="comment">// Memory for outgoing signal</span></div>
<div class="line">__USED <span class="keywordtype">char</span>          vioPrintMem[VIO_PRINTMEM_NUM][VIO_PRINT_MAX_SIZE]; <span class="comment">// Memory for the last value for each level</span></div>
<div class="line">__USED int32_t       vioValue   [VIO_VALUE_NUM];                        <span class="comment">// Memory for value used in vioGetValue/vioSetValue</span></div>
<div class="line">__USED <a class="code" href="group__vioValues__gr.html#structvioValueXYZ__t">vioValueXYZ_t</a> vioValueXYZ[VIO_VALUEXYZ_NUM];                     <span class="comment">// Memory for XYZ value for 3-D vector</span></div>
<div class="line">__USED <a class="code" href="group__vioIPAddr__gr.html#structvioAddrIPv4__t">vioAddrIPv4_t</a> vioAddrIPv4[VIO_IPV4_ADDRESS_NUM];                 <span class="comment">// Memory for IPv4 address value used in vioSetIPv4/vioGetIPv4</span></div>
<div class="line">__USED <a class="code" href="group__vioIPAddr__gr.html#structvioAddrIPv6__t">vioAddrIPv6_t</a> vioAddrIPv6[VIO_IPV6_ADDRESS_NUM];                 <span class="comment">// Memory for IPv6 address value used in vioSetIPv6/vioGetIPv6</span></div>
</div><!-- fragment --><p>Use these memory locations to monitor or set the variables as required in the application.</p>
<p>Two defines are available that help to disconnect the actual peripherals and enable virtual I/Os: <code>CMSIS_VIN</code> and <code>CMSIS_VOUT</code>. They help to write code that can be used in testing environments without real hardware access. The following implementation example shows such code:</p>
<p><b>Code Example (VIO Implementation)</b> </p>
<div class="fragment"><div class="line"><span class="comment">// Initialize test input, output.</span></div>
<div class="line"><span class="keywordtype">void</span> <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  uint32_t i;</div>
<div class="line"><span class="preprocessor">#if !defined CMSIS_VIN</span></div>
<div class="line"><span class="preprocessor"></span><span class="comment">// Add user variables here:</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#if !defined CMSIS_VOUT</span></div>
<div class="line"><span class="preprocessor"></span><span class="comment">// Add user variables here:</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line">  vioSignalIn  = 0U;</div>
<div class="line">  vioSignalOut = 0U;</div>
<div class="line"> </div>
<div class="line">  memset (vioPrintMem, 0, <span class="keyword">sizeof</span>(vioPrintMem));</div>
<div class="line">  memset (vioValue,    0, <span class="keyword">sizeof</span>(vioValue));</div>
<div class="line">  memset (vioValueXYZ, 0, <span class="keyword">sizeof</span>(vioValueXYZ));</div>
<div class="line">  memset (vioAddrIPv4, 0, <span class="keyword">sizeof</span>(vioAddrIPv4));</div>
<div class="line">  memset (vioAddrIPv6, 0, <span class="keyword">sizeof</span>(vioAddrIPv6));</div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#if !defined CMSIS_VOUT</span></div>
<div class="line"><span class="preprocessor"></span><span class="comment">// Add user code here:</span></div>
<div class="line"><span class="comment">// &lt;code vioInit output&gt;</span></div>
<div class="line"> </div>
<div class="line">  BSP_LED_Init(LED_BLUE);</div>
<div class="line">  BSP_LED_Init(LED_RED);</div>
<div class="line">  BSP_LED_Init(LED_GREEN);</div>
<div class="line"><span class="comment">// &lt;/code&gt;</span></div>
<div class="line"><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="preprocessor">#if !defined CMSIS_VIN</span></div>
<div class="line"><span class="preprocessor"></span><span class="comment">// Add user code here:</span></div>
<div class="line"><span class="comment">// &lt;code vioInit input&gt;</span></div>
<div class="line"> </div>
<div class="line">  BSP_PB_Init(BUTTON_USER, BUTTON_MODE_GPIO);</div>
<div class="line"><span class="comment">// &lt;/code&gt;</span></div>
<div class="line"><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line">  <span class="keywordflow">return</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p><b>Memory display in IDEs</b></p>
<p>Arm Keil MDK uses the provided SCVD file to display the VIO signals in Component Viewer:</p>
<div class="image">
<img src="vioComponentViewer.png" alt="vioComponentViewer.png"/>
</div>
 <h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga84e05ae351226f41d461dbe982b2372f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vioInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize test input, output. </p>
<dl class="section return"><dt>Returns</dt><dd>none.</dd></dl>
<p>The function <b>vioInit</b> initializes the VIO interface. Use it to initialize any connected hardware that is used to map VIO signals.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line"> </div>
<div class="line">  <span class="comment">// System Initialization</span></div>
<div class="line">  SystemCoreClockUpdate();</div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  <span class="comment">// ...</span></div>
<div class="line"> </div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga1dcabb62642917a4911d26175132a339"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t vioPrint </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Print formated string to test terminal. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td>level (vioLevel...). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>formated string to print. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>optional arguments (depending on format string). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of characters written or -1 in case of error.</dd></dl>
<p>The function <b>vioPrint</b> prints a formatted string to a test terminal. Formatting of the output follows the rules of standard C language printf().</p>
<p>Refer to <a class="el" href="group__vioPrintLevels__gr.html">Print Levels</a> for information about the possible <em>levels</em>.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="keywordtype">int</span> x = 3;</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga1dcabb62642917a4911d26175132a339">vioPrint</a>(<a class="code" href="group__vioPrintLevels__gr.html#ga4a2f40db5d209268b9e0669e919c7436">vioLevelNone</a>,    <span class="stringliteral">&quot;Test [None]&quot;</span>); </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga1dcabb62642917a4911d26175132a339">vioPrint</a>(<a class="code" href="group__vioPrintLevels__gr.html#ga2d12345777fbb057da8a847f2c74332d">vioLevelHeading</a>, <span class="stringliteral">&quot;Test [Heading] = Network Connector Message&quot;</span>); </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga1dcabb62642917a4911d26175132a339">vioPrint</a>(<a class="code" href="group__vioPrintLevels__gr.html#gadc4de0163245bf69476bab577c88f972">vioLevelMessage</a>, <span class="stringliteral">&quot;Test [Message] = Connection failed&quot;</span>); </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga1dcabb62642917a4911d26175132a339">vioPrint</a>(<a class="code" href="group__vioPrintLevels__gr.html#gae2d092fb498aa5ef8fe01bb9287edd17">vioLevelError</a>,   <span class="stringliteral">&quot;Test [Error]   = %d&quot;</span>, x); </div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga1ded6ad7451e43d94f00e9efaddfe621"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vioSetSignal </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>signal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set signal output. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mask</td><td>bit mask of signals to set. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">signal</td><td>signal value to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none.</dd></dl>
<p>The function <b>vioSetSignal</b> set a <em>signal</em> to an output specified by <em>mask</em>. Use this function to map VIOs to actual hardware for displaying signals on a target board.</p>
<p>Refer to <a class="el" href="group__vioSignals__gr.html">Signals</a> for information about the possible <em>mask</em> and <em>signal</em> values.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga1ded6ad7451e43d94f00e9efaddfe621">vioSetSignal</a>(<a class="code" href="group__vioSignals__gr.html#ga026dee2deae0bea0ff4891d5f5f11c90">vioLED0</a>, <a class="code" href="group__vioSignals__gr.html#gae909aa203834183f9f10f267b1dc7dc8">vioLEDon</a>);</div>
<div class="line">  <span class="comment">// ...</span></div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga1ded6ad7451e43d94f00e9efaddfe621">vioSetSignal</a>(<a class="code" href="group__vioSignals__gr.html#ga026dee2deae0bea0ff4891d5f5f11c90">vioLED0</a>, <a class="code" href="group__vioSignals__gr.html#gac47779d89b1e40ea5254bef26accf0ee">vioLEDoff</a>);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga852f94060d9bef92b193e9992a1c2016"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t vioGetSignal </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get signal input. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mask</td><td>bit mask of signals to read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>signal value.</dd></dl>
<p>The function <b>vioGetSignal</b> retrieves a signal from an input identified by <em>mask</em>. Use this function to read data from any input that is provided.</p>
<p>Refer to <a class="el" href="group__vioSignals__gr.html">Signals</a> for information about the possible <em>mask</em> values.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  uint32_t state;</div>
<div class="line">  uint32_t last = 0U;</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  <span class="keywordflow">for</span> (;;) {</div>
<div class="line">    state = (<a class="code" href="group__vio__interface__gr.html#ga852f94060d9bef92b193e9992a1c2016">vioGetSignal</a> (<a class="code" href="group__vioSignals__gr.html#ga642440766bc00069da04379bc1f1598d">vioBUTTON0</a>)); <span class="comment">// Get pressed button state</span></div>
<div class="line">    <span class="keywordflow">if</span> (state != last){</div>
<div class="line">      <span class="keywordflow">if</span> (state == <a class="code" href="group__vioSignals__gr.html#ga642440766bc00069da04379bc1f1598d">vioBUTTON0</a>){</div>
<div class="line">        <span class="comment">// do something</span></div>
<div class="line">      }</div>
<div class="line">    }</div>
<div class="line">    last = state;</div>
<div class="line">  }</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga5d2572868a34ccfdb10d32adce8f6102"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vioSetValue </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set value output. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>output identifier. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>value to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none.</dd></dl>
<p>The function <b>vioSetValue</b> set the <em>value</em> to the output identified by <em>id</em>. Use this function to set states of I/Os for example.</p>
<p>Refer to <a class="el" href="group__vioValues__gr.html">Values</a> for information about <em>value</em> and <a class="el" href="group__vioIDs__gr.html">IDs</a> for <em>id</em>.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga5d2572868a34ccfdb10d32adce8f6102">vioSetValue</a>(<a class="code" href="group__vioValues__gr.html#ga2eb17d856c43efcb7ba816822581b291">vioAOUT0</a>, 1024);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga637e596f4309323b1e4e1da6200d4717"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t vioGetValue </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get value input. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>input identifier. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>value retrieved from input.</dd></dl>
<p>The function <b>vioGetValue</b> retrieves a value from the input identified by <em>id</em>. Use this function to read data from inputs.</p>
<p>Refer to <a class="el" href="group__vioIDs__gr.html">IDs</a> for information about <em>id</em>.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  uint32_t button;</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  button = <a class="code" href="group__vio__interface__gr.html#ga637e596f4309323b1e4e1da6200d4717">vioGetValue</a>(<a class="code" href="group__vioSignals__gr.html#ga642440766bc00069da04379bc1f1598d">vioBUTTON0</a>);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga440aca5e2a9fb89a56ce727329b23b54"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vioSetXYZ </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__vioValues__gr.html#structvioValueXYZ__t">vioValueXYZ_t</a>&#160;</td>
          <td class="paramname"><em>valueXYZ</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set XYZ value output. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>output identifier. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">valueXYZ</td><td>XYZ data to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none.</dd></dl>
<p>The function <b>vioSetXYZ</b> sets a three-dimensional value <em>valueXYZ</em> to the output identified by <em>id</em>. Use this function to apply a 3d value to an output.</p>
<p>Refer to <a class="el" href="group__vioValues__gr.html">Values</a> for information about the <em>valueXYZ</em> and <a class="el" href="group__vioIDs__gr.html">IDs</a> for <em>id</em>.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  <a class="code" href="group__vioValues__gr.html#structvioValueXYZ__t">vioValueXYZ_t</a> xyz = {123, 456, 789};</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga440aca5e2a9fb89a56ce727329b23b54">vioSetXYZ</a>(0, xyz);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga3e1e45b6a85ae9a3a7f30ef9918c34b1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__vioValues__gr.html#structvioValueXYZ__t">vioValueXYZ_t</a> vioGetXYZ </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get XYZ value input. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>input identifier. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XYZ data retrieved from XYZ peripheral.</dd></dl>
<p>The function <b>vioGetXYZ</b> retrieves a three-dimensional value from the input identified by <em>id</em>. Use this function to get a 3d value.</p>
<p>Refer to <a class="el" href="group__vioIDs__gr.html">IDs</a> for information about <em>id</em>.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="keyword">volatile</span> <a class="code" href="group__vioValues__gr.html#structvioValueXYZ__t">vioValueXYZ_t</a> xyz;</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  xyz = <a class="code" href="group__vio__interface__gr.html#ga3e1e45b6a85ae9a3a7f30ef9918c34b1">vioGetXYZ</a>(<a class="code" href="group__vioIDs__gr.html#ga39e8b7d134a1834ad7cd1b3dd94bdaf5">vioMotionGyro</a>);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="gafec1413f0d3624bb8922a3973636b587"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vioSetIPv4 </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__vioIPAddr__gr.html#structvioAddrIPv4__t">vioAddrIPv4_t</a>&#160;</td>
          <td class="paramname"><em>addrIPv4</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set IPv4 address output. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>output identifier. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">addrIPv4</td><td>pointer to IPv4 address. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none.</dd></dl>
<p>The function <b>vioSetIPv4</b> sets an IPv4 address specified by <em>addrIPv4</em> to an interface identified by <em>id</em>. Use this function to assign an IPv4 address to an interface.</p>
<p>Refer to <a class="el" href="group__vioIDs__gr.html">IDs</a> for information about <em>id</em> and <a class="el" href="group__vioIPAddr__gr.html">IP Addresses</a> for <em>addrIPv4</em>.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  <a class="code" href="group__vioIPAddr__gr.html#structvioAddrIPv4__t">vioAddrIPv4_t</a> addrIPv4 = {192U, 168U, 111U, 123U};</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#gafec1413f0d3624bb8922a3973636b587">vioSetIPv4</a> (0, addrIPv4);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga22b8711d1858eedde919053d269aa073"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__vioIPAddr__gr.html#structvioAddrIPv4__t">vioAddrIPv4_t</a> vioGetIPv4 </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get IPv4 address input. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>input identifier. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>IPv4 address retrieved from peripheral.</dd></dl>
<p>The function <b>vioGetIPv4</b> retrieves the IPv4 addrIPv4 from an interface identified by <em>id</em>. Use this function to read an IPv4 address.</p>
<p>Refer to <a class="el" href="group__vioIDs__gr.html">IDs</a> for information about <em>id</em>.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  <a class="code" href="group__vioIPAddr__gr.html#structvioAddrIPv4__t">vioAddrIPv4_t</a> addrIPv4;</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  addrIPv4 = <a class="code" href="group__vio__interface__gr.html#ga22b8711d1858eedde919053d269aa073">vioGetIPv4</a>(0);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga3592d2a14aca73d219022712279b8fa5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vioSetIPv6 </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__vioIPAddr__gr.html#structvioAddrIPv6__t">vioAddrIPv6_t</a>&#160;</td>
          <td class="paramname"><em>addrIPv6</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set IPv6 address output. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>output identifier. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">addrIPv6</td><td>pointer to IPv6 address. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none.</dd></dl>
<p>The function <b>vioSetIPv6</b> sets an IPv6 address specified by <em>addrIPv6</em> to an interface identified by <em>id</em>. Use this function to assign an IPv6 address to an interface.</p>
<p>Refer to <a class="el" href="group__vioIDs__gr.html">IDs</a> for information about <em>id</em> and <a class="el" href="group__vioIPAddr__gr.html">IP Addresses</a> for <em>addrIPv6</em>.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  <a class="code" href="group__vioIPAddr__gr.html#structvioAddrIPv6__t">vioAddrIPv6_t</a> addrIPv6 = {1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U,</div>
<div class="line">                           9U, 10U, 11U, 12U, 13U, 14U, 15U, 16U};</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga3592d2a14aca73d219022712279b8fa5">vioSetIPv6</a> (0, addrIPv6);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="gabde8fededde24fc47b1b80fdee4466f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__vioIPAddr__gr.html#structvioAddrIPv6__t">vioAddrIPv6_t</a> vioGetIPv6 </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get IPv6 address from peripheral. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>input identifier. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>IPv6 address retrieved from peripheral.</dd></dl>
<p>The function <b>vioGetIPv6</b> retrieves the IPv6 addrIPv6 from an interface identified by <em>id</em>. Use this function to read an IPv6 address.</p>
<p>Refer to <a class="el" href="group__vioIDs__gr.html">IDs</a> for information about <em>id</em>.</p>
<p><b>Code</b> <b>Example:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__vio_8h.html">cmsis_vio.h</a>&quot;</span>                  <span class="comment">// ::CMSIS Driver:VIO</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  <a class="code" href="group__vioIPAddr__gr.html#structvioAddrIPv6__t">vioAddrIPv6_t</a> addrIPv6;</div>
<div class="line"> </div>
<div class="line">  <a class="code" href="group__vio__interface__gr.html#ga84e05ae351226f41d461dbe982b2372f">vioInit</a>();</div>
<div class="line">  addrIPv6 = <a class="code" href="group__vio__interface__gr.html#gabde8fededde24fc47b1b80fdee4466f0">vioGetIPv6</a>(0);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">
      <script type="text/javascript">
        <!--
        writeFooter.call(this);
        //-->
      </script>    
    </li>
  </ul>
</div>
</body>
</html>
